For beam shaping in conventional optoelectronic devices, a lens is often arranged downstream of a semiconductor chip of the device. Said lens is adhesively bonded onto a encapsulation protecting the semiconductor chip, for example. However, such an adhesive-bonding connection is often not stable with respect to deformations of the encapsulation or the action of radiation, thereby increasing the risk of an impaired optical linking of the optical element to the semiconductor chip. Furthermore, lenses used in conventional optoelectronic devices often degrade under short-wave, in particular ultraviolet or blue, radiation, which may be manifested for example by obfuscation, discolorations or deformations of the lens.